<template>
  <Modal v-model="processPop" width="36" :mask-closable="false" class-name="vertical-center-modal" :closable="false">
    <div slot="header" class="head-title">
      {{ $t("event.ProcessingOrder") }}
    </div>
    <div class="detail-content">
      <div class="progress-sty">
        <div class="gray-line"></div>
        <div class="progress"></div>
      </div>
      <div class="label-text">
        <div class="text">{{ $t("event.checkingInventory") }}</div>
        <div class="text">{{ $t("event.applyingForDiscounts") }}</div>
        <div class="text">{{ $t("event.initiatingPayment") }}</div>
      </div>
      <!-- 等待提示 -->
      <div class="tips-text" v-if="invalidList != ''">
        {{ $t("event.PleaseWaitAMoment") }}
      </div>
      <!-- 失效商品 -->
      <div class="expire-content" v-if="invalidList != ''">
        <div class="expire-tips">{{ $t("event.followingProducts") }}</div>
        <div class="table-tr">
          <div class="table-body" v-for="item in invalidList" :key="item.id">
            <Row :gutter="24">
              <Col span="6">
              <div class="td vertical-sty">
                <img :src="item.mainImg" class="img-sty" alt="" />
              </div>
              </Col>
              <!-- 信息 -->
              <Col span="6">
              <div class="td">
                <div class="title">
                  {{ item.subject }}
                </div>
                <div class="intro" v-for="attributeItem in item.skuAttrEnumFormatList" :key="attributeItem.id">
                  <div class="intro-text">
                    {{ attributeItem.name }}：{{ attributeItem.value }}
                  </div>
                </div>
              </div>
              </Col>
              <!-- 数量 -->
              <Col span="12">
              </Col>
            </Row>
          </div>
        </div>
      </div>
    </div>
    <div slot="footer" class="footer-sty">
      <div class="remove-btn" @click="removeMet" v-if="invalidList != ''">
        {{ $t("event.changedRemoveAll") }}
      </div>
    </div>
  </Modal>
</template>
<script>
export default {
  props: ['invalidList'],
  data() {
    return {
      processPop: false
    };
  },
  methods: {
    open() {
      this.processPop = true;
    },
    removeMet() {
      this.processPop = false;
      this.$emit("removeMet");
    },
    close() {
      this.processPop = false;
    }
  },
};
</script>

<style lang="less" scoped>
:deep(.ivu-modal-content) {
  border-radius: 18px;
}

:deep(.ivu-modal-header) {
  border: none;
  padding: 28px 32px;
}

:deep(.ivu-modal-body) {
  padding: 0 32px;
}

:deep(.ivu-modal-footer) {
  border: none;
  padding: 28px 32px;
}

:deep(.ivu-modal-close) {
  position: absolute;
  top: 20px;
  right: 26px;
}

:deep(.ivu-modal-close .ivu-icon-ios-close) {
  color: #333333;
  font-size: 64px;
  font-weight: 800;
}

.vertical-center-modal {
  display: flex;
  align-items: center;
  justify-content: center;

  .head-title {
    font-family: PingFang SC, PingFang SC;
    font-weight: 600;
    font-size: 32px;
    color: #1e1714;
    line-height: 38px;
  }

  .detail-content {
    .progress-sty {
      position: relative;

      .gray-line {
        height: 11px;
        background: #f7f9fc;
        border-radius: 53px 53px 53px 53px;
      }

      .progress {
        width: 120px;
        height: 7px;
        background: linear-gradient(271deg, #fe3161 0%, #35e7cf 100%);
        border-radius: 15px 15px 15px 15px;
        position: absolute;
        top: 1.5px;
        left: 0;
      }
    }

    .label-text {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-top: 16px;

      .text {
        font-family: Open Sans, Open Sans;
        font-weight: 400;
        font-size: 16px;
        color: #74767f;
        line-height: 19px;
      }
    }

    .tips-text {
      font-family: Open Sans, Open Sans;
      font-weight: 600;
      font-size: 20px;
      color: #1e1714;
      line-height: 23px;
      text-align: center;
      margin-top: 40px;
    }

    .expire-content {
      margin-top: 40px;

      .expire-tips {
        font-family: Open Sans, Open Sans;
        font-weight: 600;
        font-size: 18px;
        color: #1e1714;
        line-height: 21px;
      }

      .table-tr {
        .table-body {
          .td {
            margin-top: 24px;

            .title {
              font-family: PingFang SC, PingFang SC;
              font-weight: 400;
              font-size: 18px;
              color: #1e1714;
              line-height: 21px;
              white-space: pre-line;
              /*允许换行*/
              overflow: hidden;
              text-overflow: ellipsis;
              /*省略号*/
              display: -webkit-box;
              -webkit-box-orient: vertical;
              /*行向垂直排列*/
              -webkit-line-clamp: 1; //*限制2
            }

            .img-sty {
              width: 120px;
              height: 120px;
              border-radius: 8px 8px 8px 8px;
              border: 1px solid #e9eaf3;
            }

            a {
              font-family: PingFang SC, PingFang SC;
              font-weight: 400;
              font-size: 18px;
              color: #1e1714;
              line-height: 21px;
              white-space: pre-line;
              /*允许换行*/
              overflow: hidden;
              text-overflow: ellipsis;
              /*省略号*/
              display: -webkit-box;
              -webkit-box-orient: vertical;
              /*行向垂直排列*/
              -webkit-line-clamp: 1; //*限制2
            }

            .intro {
              font-family: PingFang TC, PingFang TC;
              font-weight: 400;
              font-size: 15px;
              color: #aeb0b9;
              line-height: 18px;
              margin-top: 8px;
            }

            .ivu-input-number {
              border: 1px solid #e9eaf3;
            }

            .original-price {
              font-family: PingFang SC, PingFang SC;
              font-weight: 400;
              font-size: 17px;
              color: #aeb0b9;
              line-height: 19px;
              margin-top: 50px;
            }

            .discounted-price {
              font-family: PingFang SC, PingFang SC;
              font-weight: 500;
              font-size: 20px;
              color: #fe3161;
              line-height: 23px;
              margin-top: 12px;
            }

            .quantity-sty {
              margin-top: 30px;
            }
          }

          .vertical-sty {
            display: flex;
            align-items: center;
          }

          .align-sty {
            text-align: right;
          }
        }
      }
    }
  }

  .footer-sty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    .remove-btn {
      padding: 14px 20px;
      background: #ff186b;
      border-radius: 8px;
      font-family: SF Pro, SF Pro;
      font-weight: 400;
      font-size: 17px;
      color: #ffffff;
      line-height: 10px;
      cursor: pointer;
    }
  }
}
</style>
